// 二级路由
import Cloud from "../views/Cloud.vue";
import Question from "../views/Question.vue";
import Help from "../views/Help.vue";
import Message from "../views/Message.vue";
import Index from "../views/pages/index/Index.vue";
// --首页三级路由
import Daily from "../views/pages/index/pages/daily.vue";
// 三级路由
// --任务管理
import JoinTask from "../views/pages/task/JoinTask.vue";
import CreateTask from "../views/pages/task/CreateTask.vue";
import Filed from "../views/pages/task/Filed.vue";
// --项目管理
import Bid from "../views/pages/project/Bid.vue";
import ProjectAdmin from "../views/pages/project/ProjectAdmin.vue";
// --合同管理
import Stuff from "../views/pages/Contract/Stuff.vue";
import BuildTeam from "../views/pages/Contract/BuildTeam.vue";
import ProjectContract from "../views/pages/Contract/ProjectContract.vue";
import RoutineContract from "../views/pages/Contract/routineContract.vue";
// 合同管理四级路由
// -----------------------材料管理合同--------------------------------------------------------------------
// 添加材料管理合同
import StuffAddContract from "../views/pages/Contract/StuffContract/StuffAddContract.vue";
// 材料管理合同详情
import StuffDetailsContract from "../views/pages/Contract/StuffContract/StuffDetailsContract.vue";
// 编辑材料管理合同
import EditStuffContract from "../views/pages/Contract/StuffContract/EditStuffContract.vue";
// ------------------------施工班组合同-------------------------------------------------------------------
// 添加施工班组合同
import AddContract from "../views/pages/Contract/BuildTeamContract/AddContract.vue";
// 施工班组合同详情
import EditTeamDetailsContract from "../views/pages/Contract/BuildTeamContract/EditTeamDetailsContract.vue";
// 编辑施工班组合同
import EditTBuildeamContract from "../views/pages/Contract/BuildTeamContract/EditTBuildeamContract.vue";
// ------------------------项目合同--------------------------------------------------------------------
// 项目合同详情
import ProjectContractdetails from "../views/pages/Contract/projectContract/ProjectContractdetails.vue";
// 添加项目合同
import AddProjectContract from "../views/pages/Contract/projectContract/AddProjectContract.vue";
// 编辑项目合同
import EditProjectContract from "../views/pages/Contract/projectContract/EditProjectContract.vue";
// -------------------------审批管理-----------------------------------------
// --审批管理
import StartBatch from "../views/pages/batch/StartBatch.vue";
// 审批管理----班级付款申请
import AddClass from "../views/pages/batch/InitiateApproval/AddClass.vue"; //班级新增
import CurrentDetails from "../views/pages/batch/InitiateApproval/CurrentDetails.vue"; //详情
import editClass from "../views/pages/batch/InitiateApproval/editClass.vue"; //编辑
import AddPurchase from "../views/pages/batch/InitiateApproval/AddPurchase.vue"; //采购付费新增
import AddTemporary from "../views/pages/batch/InitiateApproval/AddTemporary.vue"; //临时付款新增
import AddUseSeal from "../views/pages/batch/InitiateApproval/AddUseSeal.vue"; //用章新增
import AddSample from "../views/pages/batch/InitiateApproval/AddSample.vue"; //选样新增联系单签发新增
import AddContactlist from "../views/pages/batch/InitiateApproval/AddContactlist.vue"; //联系单签发新增材料采购新增
import AddMaterialScience from "../views/pages/batch/InitiateApproval/AddMaterialScience.vue"; //劳务新增材料采购新增
import Addlabour from "../views/pages/batch/InitiateApproval/Addlabour.vue"; //劳务新增
// 审批管理---经办---班级付款  
import HandlingDetails from "../views/pages/batch/HandlingApproval/HandlingDetails.vue"; //表格--详情
// 审批管理---抄送---班级付款审批 
import CCdetails from "../views/pages/batch/CCApproval/CCdetails.vue"; //班级付款审批详情

// ----四级路由
import BatchRoiter from "../utils/batchRouter"
import HandleBatch from "../views/pages/batch/HandleBatch.vue";
import CcBatch from "../views/pages/batch/CcBatch.vue";
// --招采管理
import SupplierAdmin from "../views/pages/collection/SupplierAdmin.vue";
import BuildTeamAdmin from "../views/pages/collection/BuildTeamAdmin.vue";
import PurchaseAdmin from "../views/pages/collection/PurchaseAdmin.vue";
// --人事行政管理
import Notice from "../views/pages/administration/Notice.vue";
import Punch from "../views/pages/administration/Punch.vue";
import Recruit from "../views/pages/administration/Recruit.vue";
// --财务管理
import StandingBook from "../views/pages/finance/StandingBook.vue";
import Payment from "../views/pages/finance/Payment.vue";
import CollectionRecord from "../views/pages/finance/CollectionRecord.vue";
// --知识库管理
import KnowledgeList from "../views/pages/knowledge/KnowledgeList.vue";
import Sort from "../views/pages/knowledge/Sort.vue";
// --组织管理
import Department from "../views/pages/organization/Department.vue";
import Post from "../views/pages/organization/Post.vue";
import Staff from "../views/pages/organization/Staff.vue";
// --设置
import Procedure from "../views/pages/fit/Procedure.vue";
import Mission from "../views/pages/fit/Mission.vue";
import AttendanceGroup from "../views/pages/fit/AttendanceGroup.vue";
import FormFit from "../views/pages/fit/FormFit.vue";
import AccountSettings from "../views/pages/fit/AccountSettings.vue";
//设置跳转
import attendanceadd from "../views/pages/fit/jump/attendanceadd.vue"
import addnew from '../views/pages/fit/jump/addnew.vue'
// --RouterView
let routerList = [{
  path: 'index',
  name: 'index',
  component: () =>
    import(`@/views/RouterView`),
  meta: { title: ['首页'] },
  title: '首页',
  icon: 'iconfont icon-shouye',
  children: [{
    path: '/home/index',
    name: 'indexChild',
    component: Index,
    meta: { title: ['首页'] },
    title: '首页',
    url: '/home/index',
    icon: 'iconfont icon-shouye',
    // hidden: true
  },
  {
    path: '/home/index/daily',
    name: 'daily',
    component: Daily,
    meta: { title: ['工作日报'] },
    title: '工作日报',
    url: '/home/index/daily',
    icon: 'iconfont icon-shouye',
    hidden: true
  }
  ]
},
{
  path: 'task',
  name: 'task',
  component: () =>
    import(`@/views/RouterView`),
  meta: { tiele: ['任务管理'] },
  title: '任务管理',
  icon: 'iconfont icon-daibanrenwu',
  children: [
    // 我负责的任务
    {
      path: '/task/responsible', name: 'responsible', component: () =>
        import('../views/pages/task/Responsible.vue'), url: '/home/task/responsible', meta: { title: ['我负责的任务'] }, title: '我负责的任务'
    },
    // 我参加的任务
    { path: '/task/joinTask', name: 'joinTask', component: JoinTask, url: '/home/task/joinTask', meta: { title: ['我参加的任务'] }, title: '我参加的任务' },
    // 我创建的任务
    { path: '/task/createTask', name: 'createTask', component: CreateTask, url: '/home/task/createTask', meta: { title: ['我创建的任务'] }, title: '我创建的任务' },
    // 已归档的任务
    { path: '/task/filed', name: 'filed', component: Filed, url: '/home/task/filed', meta: { title: ['已归档的任务'] }, title: '已归档的任务' }
  ]
},

// 项目管理二级路由
{
  path: 'project',
  name: 'project',
  meta: { tiele: ['项目管理'] },
  title: '项目管理',
  icon: 'iconfont icon-xiangmu',
  component: () =>
    import(`@/views/RouterView`),
  children: [
    // 投标管理
    {
      path: '/project/bid',
      name: 'bid',
      component: Bid,
      meta: { title: ['投标管理'] },
      title: '投标管理',
      props: true // children: [
      //   { path: '/project/bid/addBid', name: "addBid", component: () => import("../views/pages/project/bid_pages/addBid"), url: "/home/project/bid/addBid", },
      //   { path: '/project/bid/bidDetails', name: "bidDetails", component: () => import("../views/pages/project/bid_pages/bidDetails"), url: "/home/project/bid/bidDetails", },]
    },
    // 项目管理
    { path: '/project/projectAdmin', name: 'projectAdmin', component: ProjectAdmin, meta: { title: ['项目管理'] }, title: '项目管理', props: true },
  ]
},
// 项目管理三级(已解决)-----cj
// 投标
{
  path: '/project/bid',
  name: 'bid',
  component: () =>
    import(`@/views/pages/project/RouterView`),
  children: [
    {
      path: '/project/bid/addBid', name: "addBid", component: () =>
        import("../views/pages/project/bid_pages/addBid"), url: "/home/project/bid/addBid",
    },
    {
      path: '/project/bid/editBid', name: "editBid", component: () =>
        import("../views/pages/project/bid_pages/editBid"), url: "/home/project/bid/editBid",
    },
    {
      path: '/project/bid/bidDetails', name: "bidDetails", component: () =>
        import("../views/pages/project/bid_pages/bidDetails"), url: "/home/project/bid/bidDetails",
    },
  ],
  hidden: true
},
//项目管理
{
  path: '/project/admin',
  name: 'admin',
  component: () =>
    import(`@/views/pages/project/RouterView`),
  children: [
    {
      path: '/project/admin/projectDetails', name: "projectDetails", component: () =>
        import("../views/pages/project/admin_pages/projectDetails"), url: "/home/project/admin/projectDetails",
    },
    {
      path: '/project/admin/projectTodo', name: "projectTodo", component: () =>
        import("../views/pages/project/admin_pages/projectTodo"), url: "/home/project/admin/projectTodo",
    },
  ],
  hidden: true
},
{
  path: 'contract',
  name: 'contract',
  component: () =>
    import(`@/views/RouterView`),
  meta: { tiele: ['合同管理'] },
  title: '合同管理',
  icon: 'iconfont icon-hetong',
  // 子路由
  children: [
    // 材料管理合同
    {
      path: '/contract/stuff',
      name: 'stuff',
      component: Stuff,
      meta: { title: ['材料管理合同'] },
      title: '材料管理合同',
      children: [{
        path: '/contract/stuff/stuffAddContract',
        name: 'stuffAddContract',
        component: StuffAddContract,
        meta: { title: ['添加材料管理合同'] },
        title: '添加材料管理合同',
      },
      {
        path: '/contract/stuff/stuffDetailsContract',
        name: 'stuffDetailsContract',
        component: StuffDetailsContract,
        meta: { title: ['材料管理合同详情'] },
        title: '材料管理合同详情',
      },
      {
        path: '/contract/stuff/editStuffContract',
        name: 'editStuffContract',
        component: EditStuffContract,
        meta: { title: ['编辑材料管理合同'] },
        title: '编辑材料管理合同',
      }
      ]
    },
    // 施工班组合同
    {
      path: '/contract/buildTeam',
      name: 'buildTeam',
      component: BuildTeam,
      meta: { title: ['施工班组合同'] },
      title: '施工班组合同',
      children: [{
        path: '/contract/buildTeam/addContract',
        name: 'addContract',
        component: AddContract,
        meta: { title: ['添加施工班组合同'] },
        title: '添加施工班组合同',
      },
      {
        path: '/contract/buildTeam/editTeamDetailsContract',
        name: 'editTeamDetailsContract',
        component: EditTeamDetailsContract,
        meta: { title: ['施工班组合同详情'] },
        title: '施工班组合同详情',
      },
      {
        path: '/contract/buildTeam/editTBuildeamContract',
        name: 'editTBuildeamContract',
        component: EditTBuildeamContract,
        meta: { title: ['编辑施工班组合同'] },
        title: '编辑施工班组合同',
      }
      ]
    },
    // 项目合同
    {
      path: '/contract/projectContract',
      name: 'projectContract',
      component: ProjectContract,
      meta: { title: ['项目合同'] },
      title: '项目合同',
      children: [{
        path: '/contract/projectContract/projectContractdetails',
        name: 'projectContractdetails',
        component: ProjectContractdetails,
        meta: { title: ['项目合同详情'] },
        title: '项目合同详情',
      },
      {
        path: '/contract/projectContract/addProjectContract',
        name: 'addProjectContract',
        component: AddProjectContract,
        meta: { title: ['新增项目合同'] },
        title: '新增项目合同',
      },
      {
        path: '/contract/projectContract/editProjectContract',
        name: 'editProjectContract',
        component: EditProjectContract,
        meta: { title: ['编辑项目合同'] },
        title: '编辑项目合同',
      }
      ]
    },
    // 常规合同
    { path: '/contract/routineContract', name: 'routineContract', component: RoutineContract, meta: { title: ['常规合同'] }, title: '常规合同' },
  ]
},
{
  path: 'batch',
  name: 'batch',
  component: () =>
    import(`@/views/RouterView`),
  meta: { tiele: ['审批管理'] },
  title: '审批管理',
  icon: 'iconfont icon-shenpi',
  // 子路由
  children: [
    // 我发起的审批
    {
      path: '/batch/startBatch',
      name: 'startBatch',
      component: StartBatch,
      meta: { tiele: ['我发起的审批'] },
      title: '我发起的审批',
      redirect: '/batch/startBatch/classPaApp',
      children: BatchRoiter.startBatchRoute()
    },
    // 我经办的审批
    {
      path: '/batch/handleBatch',
      name: 'handleBatch',
      component: HandleBatch,
      meta: { tiele: ['我经办的审批'] },
      title: '我经办的审批',
      redirect: '/batch/handleBatch/ClassPayment',
      children: BatchRoiter.HandleBatchRoute()
    },
    // 抄送给我的审批
    {
      path: '/batch/ccBatch',
      name: 'ccBatch',
      component: CcBatch,
      meta: { tiele: ['抄送给我的审批'] },
      title: '抄送给我的审批',
      redirect: '/batch/handleBatch/ClassPaymentCC',
      children: BatchRoiter.CCApprovalRoute()
    },
    // -------------------------------------------------------
    // ---------BUG------------------
    {
      path: '/batch/startBatch/AddClass',
      name: 'AddClass',
      component: AddClass,
      meta: { title: ['新增班级付款申请'] },
      title: '新增班级付款申请',
      hidden: true
    },
    {
      path: '/batch/startBatch/CurrentDetails',
      name: 'CurrentDetails',
      component: CurrentDetails,
      meta: { title: ['详情'] },
      title: '详情',
      hidden: true
    },
    {
      path: '/batch/startBatch/editClass',
      name: 'editClass',
      component: editClass,
      meta: { title: ['编辑'] },
      title: '编辑',
      hidden: true
    },
    {
      path: '/batch/startBatch/AddPurchase',
      name: 'AddPurchase',
      component: AddPurchase,
      meta: { title: ['材料采购付费新增'] },
      title: '材料采购付费新增',
      hidden: true
    },
    {
      path: '/batch/startBatch/AddTemporary',
      name: 'AddTemporary',
      component: AddTemporary,
      meta: { title: ['临时付费新增'] },
      title: '临时付费新增',
      hidden: true
    },
    {
      path: '/batch/startBatch/AddUseSeal',
      name: 'AddUseSeal',
      component: AddUseSeal,
      meta: { title: ['用章新增'] },
      title: '用章新增',
      hidden: true
    },
    {
      path: '/batch/startBatch/AddSample',
      name: 'AddSample',
      component: AddSample,
      meta: { title: ['选样新增'] },
      title: '选样新增',
      hidden: true
    },
    {
      path: '/batch/startBatch/AddContactlist',
      name: 'AddContactlist',
      component: AddContactlist,
      meta: { title: ['联系单签发新增'] },
      title: '联系单签发新增',
      hidden: true
    },
    {
      path: '/batch/startBatch/AddMaterialScience',
      name: 'AddMaterialScience',
      component: AddMaterialScience,
      meta: { title: ['材料采购新增'] },
      title: '材料采购新增',
      hidden: true
    },
    {
      path: '/batch/startBatch/Addlabour',
      name: 'Addlabour',
      component: Addlabour,
      meta: { title: ['劳务新增'] },
      title: '劳务新增',
      hidden: true
    },
    {
      path: '/batch/handleBatch/HandlingDetails',
      name: 'HandlingDetails',
      component: HandlingDetails,
      meta: { title: ['经办班级付款'] },
      title: '经办班级付款',
      hidden: true
    },
    {
      path: '/batch/ccBatch/CCdetails',
      name: 'CCdetails',
      component: CCdetails,
      meta: { title: ['抄送班级审批详情'] },
      title: '抄送班级审批详情',
      hidden: true
    },
    // ------------------------------------------
  ]
},
{
  path: 'collection',
  name: 'collection',
  component: () =>
    import(`@/views/RouterView`),
  meta: { tiele: ['招采管理'] },
  title: '招采管理',
  icon: 'iconfont icon-caigou-xianxing',
  // 子路由
  children: [
    // 供应商管理
    { path: '/collection/supplierAdmin', name: 'supplierAdmin', component: SupplierAdmin, meta: { tiele: ['供应商管理'] }, title: '供应商管理' },
    // 施工班组管理
    { path: '/collection/buildTeamAdmin', name: 'buildTeamAdmin', component: BuildTeamAdmin, meta: { tiele: ['施工班组管理'] }, title: '施工班组管理' },
    // 采购计划管理
    { path: '/collection/purchaseAdmin', name: 'purchaseAdmin', component: PurchaseAdmin, meta: { tiele: ['采购计划管理'] }, title: '采购计划管理' },
  ]
},
{
  path: 'administration',
  name: 'administration',
  component: () =>
    import(`@/views/RouterView`),
  meta: { tiele: ['人事行政管理'] },
  title: '人事行政管理',
  icon: 'iconfont icon-renshixitong',
  // 子路由
  children: [
    // 通知公告
    { path: '/administration/notice', name: 'notice', component: Notice, meta: { tiele: ['通知公告'] }, title: '通知公告' },
    // 考勤统计
    { path: '/administration/punch', name: 'punch', component: Punch, meta: { tiele: ['考勤统计'] }, title: '考勤统计' },
    // 招聘市场
    { path: '/administration/recruit', name: 'recruit', component: Recruit, meta: { tiele: ['招聘市场'] }, title: '招聘市场' },
  ]
},
{
  path: 'finance',
  name: 'finance',
  component: () =>
    import(`@/views/RouterView`),
  meta: { tiele: ['财务管理'] },
  title: '财务管理',
  icon: 'iconfont icon-caiwu',
  // 子路由
  children: [
    // 台账管理
    { path: '/finance/standingBook', name: 'standingBook', component: StandingBook, meta: { tiele: ['台账管理'] }, title: '台账管理' },
    // 付款记录
    { path: '/finance/payment', name: 'payment', component: Payment, meta: { tiele: ['付款记录'] }, title: '付款记录' },
    // 收款记录
    { path: '/finance/collectionRecord', name: 'collectionRecord', component: CollectionRecord, meta: { tiele: ['收款记录'] }, title: '收款记录' },
  ]
},
{
  path: 'knowledge',
  name: 'knowledge',
  component: () =>
    import(`@/views/RouterView`),
  meta: { tiele: ['知识库管理'] },
  title: '知识库管理',
  icon: 'iconfont icon-wenjianjia',
  // 子路由
  children: [
    // 知识库列表
    { path: '/knowledge/knowledgeList', name: 'knowledgeList', component: KnowledgeList, meta: { tiele: ['知识库列表'] }, title: '知识库列表' },
    // 分类管理
    { path: '/knowledge/sort', name: 'sort', component: Sort, meta: { tiele: ['分类管理'] }, title: '分类管理' },
  ]
},
{
  path: 'organization',
  name: 'organization',
  component: () =>
    import(`@/views/RouterView`),
  meta: { tiele: ['组织管理'] },
  title: '组织管理',
  icon: 'iconfont icon-zuzhiqunzu',
  // 子路由
  children: [
    // 部门管理
    { path: '/organization/department', name: 'department', component: Department, meta: { tiele: ['部门管理'] }, title: '部门管理' },
    // 岗位管理 
    { path: '/organization/post', name: 'post', component: Post, meta: { tiele: ['岗位管理'] }, title: '岗位管理' },
    // 员工管理
    { path: '/organization/staff', name: 'staff', component: Staff, meta: { tiele: ['员工管理'] }, title: '员工管理' },
  ]
},
{
  path: '/home/cloud',
  name: 'cloud',
  component: Cloud,
  meta: { tiele: ['云盘管理'] },
  title: '云盘管理',
  icon: 'iconfont icon-yunpan',
},
{
  path: '/home/question',
  name: 'question',
  component: Question,
  meta: { tiele: ['问题反馈'] },
  title: '问题反馈',
  icon: 'iconfont icon-wodefankui'
},
{
  path: '/home/help',
  name: 'help',
  component: Help,
  meta: { tiele: ['帮助中心'] },
  title: '帮助中心',
  icon: 'iconfont icon-bangzhu'
},
{
  path: 'fit',
  name: 'fit',
  component: () =>
    import(`@/views/RouterView`),
  meta: { tiele: ['设置'] },
  title: '设置',
  icon: 'iconfont icon-shezhi',
  // 子路由
  children: [
    // 审批流设置
    { path: '/fit/procedure', name: 'procedure', component: Procedure, meta: { tiele: ['审批流设置'] }, title: '审批流设置' },
    // 任务模板设置
    { path: '/fit/mission', name: 'mission', component: Mission, meta: { tiele: ['任务模板设置'] }, title: '任务模板设置' },
    // 考勤组设置
    { path: '/fit/attendanceGroup', name: 'attendanceGroup', component: AttendanceGroup, meta: { tiele: ['考勤组设置'] }, title: '考勤组设置' },
    // 表单设置
    { path: '/fit/formFit', name: 'formFit', component: FormFit, meta: { tiele: ['表单设置'] }, title: '表单设置' },
    // 表单设置
    { path: '/fit/accountSettings', name: 'accountSettings', component: AccountSettings, meta: { tiele: ['账号设置'] }, title: '账号设置' },
    //跳转路由
    {
      path: '/attendanceadd',
      name: 'attendanceadd',
      component: attendanceadd
    },
    {
      path: '/addnew',
      name: 'addnew',
      component:addnew
    },
  ]
},
{
  path: 'message',
  name: 'message',
  component: Message
},
]
export default routerList